#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int m, n, max, pos1, pos2, a[100][100];
	scanf("%d %d", &m, &n);
	for (int i = 0; i < m; i++) {
		for (int j = 0; j < n; j++) {
			scanf("%d", &a[i][j]);
		}
	}
	for (int i = 0; i < m; i++) {
	     max = a[i][0];
		 pos2 = 0;
		 for (int j = 0; j < n; j++) {
			 if (max < a[i][j]) {
				 max = a[i][j];
				 pos2 = j;
			 }
		 }	
		 int x = 1;
		 for (int k = 0; k < m; k++) {
			 if (max < a[k][pos2]) {
				 pos1 = k;
				 x = 0;
				 break;
			 }
		 }
		 if (x) {
			 printf("Array[%d][%d]=%d", pos1, pos2, max);
		 }
		
	}
	
	return 0;
}